PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Window Manager >

Programming With the Mac OS 8.5 Window Manager


TransitionWindow

Displays an animation and plays the theme-appropriate sound for a window when it is shown or hidden.

pascal OSStatus TransitionWindow (
                     WindowPtr window,
                     WindowTransitionEffect effect,
                     WindowTransitionAction action,
                     const Rect *rect);
window
A value of type WindowPtr . Pass a pointer to the window that is being shown or hidden.
effect
A value of type WindowTransitionEffect . Pass a constant specifying the window transition effect to be performed. With the Mac OS 8.5 Window Manager, the only valid constant is kWindowZoomTransitionEffect ; see Window Transition Effect Constant for a description of this value.
action
A value of type WindowTransitionAction . Pass a constant specifying the window transition action to be performed; valid constants are kWindowShowTransitionAction and kWindowHideTransitionAction . See Window Transition Action Constants for descriptions of these values.
rect
A pointer to a structure of type Rect . If you pass kWindowShowTransitionAction in the action parameter then, before calling TransitionWindow , set the rectangle to specify the dimensions and position, in global coordinates, of the area from which the zoom is to start. If you pass NULL , TransitionWindow uses the center of the display screen as the source rectangle. If you pass kWindowHideTransitionAction in the action parameter then, before calling TransitionWindow , set the rectangle to specify the dimensions and position, in global coordinates, of the area at which the zoom is to end. If you pass NULL , TransitionWindow uses the center of the display screen as the destination rectangle.
function result
A result code. See Result Codes.
DISCUSSION

The TransitionWindow function displays an animation of a window's transition between the open and closed states, such as that displayed by the Finder. TransitionWindow uses the rectangle specified in the rect parameter for one end of the animation (the source or the destination of the zoom, depending upon whether the window is being shown or hidden, respectively) and the window's current size and position for the other end of the animation. TransitionWindow also plays sounds appropriate to the current theme for the opening and closing actions. See Creating a Window for an example of how your application can call the TransitionWindow function.

Your application may use TransitionWindow instead of the functions ShowWindow and HideWindow . Like these pre-Mac OS 8.5 Window Manager functions, TransitionWindow generates the appropriate update and active events when it shows and hides windows.

VERSION NOTES

Available with Mac OS 8.5 and later.


© 1999 Apple Computer, Inc. – (Last Updated 18 March 99)